package com.lqq.demo10;

public class Car extends  Vehicle{
    private int type;

    public Car() {
    }

    public Car(int type) {
        this.type = type;
    }

    public Car(String brand, String id, int type) {
        super(brand, id);
        this.type = type;
    }

    @Override
    public double getSumRent(int days) {
        if(this.type == 2){
            return 300 * days;
        } else if (this.type == 3) {
            return 350 * days;
        } else{
            return 500 * days;
        }
    }
}
